<!-- support mediagoblin -->
<script src="/js/extlib/jquery/jquery-1.11.0.min.js"></script>

<!-- This code is GPLv3 or later, as published by the FSF. -->
<script>
$(document).ready(function(){
  var cpid    = 36;
  var jsonvar = eval('jsondata' + cpid);
  var goal = jsonvar.money_target;
  var moneyRaised = jsonvar.money_raised_percentage;
  var percentWidth = moneyRaised.split('%')[0];
  if ( percentWidth > 100 ) {
      moneyRaised = '100%';
  }

  if ( percentWidth == 0) {
    $(".campaign_counter_bar").animate({width: "0.5%"}, 1000);
  } else {
    $(".campaign_counter_bar").animate({width: moneyRaised}, 1000);
  }

  $("#raised_percentage").html(moneyRaised);
  $("#raised_info").html(jsonvar.money_raised);
});
</script>

<script type="text/javascript"
        src="http://mediagoblin.org/fsf-civi-widget/?cpageId=36&widgetId=7&format=3"></script>

<div class="grid_16 campaign_banner_container">
  <div class="grid_2 alpha">
    <a href="/pages/campaign.html">
      <img class="campaign_banner_image" id="campaign_icon" />
    </a>
  </div>
  <div class="grid_13 omega campaign_slogan">

  </div>
  <div class="grid_13 omega campaign_counter_container">
    <a href="/pages/campaign.html">
      <div class="campaign_counter">
        <div class="campaign_counter_bar"></div>
        <p><span id="raised_info">Raised $ of $ 60,000.00</span></p>
      </div>
    </a>
  </div>
</div>

<script>
  var random = Math.round(Math.random());
  if ( random == 0) {
  $(".campaign_slogan").html("<p><a href='/pages/campaign.html'>We're running a campaign to revolutionize media publishing on the web. Join us!</a></p>");
  $("#campaign_icon").attr("src","/images/campaign/banner_icons/revolution.png")
  } else {
  $(".campaign_slogan").html("<p><a href='/pages/campaign.html'>We're running a campaign to fight centralized surveillance of the web. Help us out!</a></p>");
  $("#campaign_icon").attr("src","/images/campaign/banner_icons/surveillance.png")
  }
</script>

<!-- support mediagoblin -->
